home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / D / Document Stack.cpt / Development Tools / card_3120.txt < prev    next >
Text File  |  1987-11-13  |  1KB  |  55 lines

  1. -- card: 3120 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2662
  5. -- name: readFile
  6.  
  7.  
  8. -- part 3 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=207 top=303 right=325 bottom=307
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Read File
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   get fileName("TEXT")
  23.   if it is empty then exit mouseUp
  24.   put it into fileName
  25.  
  26.   put 32760 into size
  27.   put empty into card field "text"
  28.   open file fileName
  29.   read from file fileName for (size+1)
  30.   close file fileName
  31.   put the number of chars of it into count
  32.   if count > (size-1) then
  33.     beep
  34.     answer "Sorry, text file > "&size&" Chars." with "OK"
  35.     put it into card field "text"
  36.   else
  37.     put it into card field "text"
  38.   end if
  39. end mouseUp
  40.  
  41.  
  42.  
  43. -- part 4 (field)
  44. -- low flags: 01
  45. -- high flags: 0007
  46. -- rect: left=10 top=8 right=285 bottom=499
  47. -- title width / last selected line: 0
  48. -- icon id / first selected line: 0 / 0
  49. -- text alignment: 0
  50. -- font id: 3
  51. -- text size: 12
  52. -- style flags: 0
  53. -- line height: 16
  54. -- part name: text
  55.